@extends('agent.mainlayout')
@section('title')
    <div class="title"><span>代理成员管理>成员详情</span></div>
@endsection
@section('content')
        <!-- start 点击品牌管理详情-->
    <style>
        .main .four .header {
            line-height: 40px;
            height: 40px;
            border-bottom: 1px solid #cccccc;
        }
        .main .four .header span {
            color: white;
            margin-right: 30px;
            width: 70px;
            height: 34px;
            line-height: 34px;
            text-align: center;
            font-size: 14px;
            float: right;
            background: #3baeda;
            cursor: pointer;
        }
        .main .four .center {
            overflow: hidden;
        }
        .main .four .center .span1 {
            float: left;
            display: block;
            background: #36bd9c;
            width: 70px;
            height: 32px;
            text-align: center;
            line-height: 32px;
            margin-top: 40px;
            color: white;
            cursor: pointer;
            overflow: hidden;
        }
        .main .four .center .tab1 {
            font-size: 14px;
            margin-top: 10px;
            margin-left: 35px;
            width: 500px;
            text-align: left;
            float: left;
        }
        .main .four .center .tab1 tr {
            background: white ! important;
            width: 33.33%;
        }
        .main .four .center .tab1 tr td {
            padding: 8px 0;
        }
        .main .four .main {
            margin-top: 12px;
        }
        .main .four .main .info {
            padding: 12px 0;
            border-bottom: 1px solid #cccccc;
        }
        .main .four .main .main_top {
            padding: 20px 0 10px 20px;
        }
        .main .four .main .main_top span {
            padding: 0 15px;
        }
        .main .four .main .main_top input {
            height: 30px;
            width: 150px;
            box-sizing: border-box;
            padding-left: 8px;
        }
    </style>
    <style type="text/css">
        #sousuo{
            display:inline-block;
            background: #347c1e;
            color:white;
            height:25px;
            margin-left: 40px;
            cursor: pointer;
        }
        #sousuo:hover{
            background-color: #2d94e8;
        }
    </style>
    <div class="four" style="display: block">

        <div class="header">
            <span  style="    float: left;
    display: block;
    background: #36bd9c;
    width: 70px;
    height: 32px;
    text-align: center;
    line-height: 32px;
    color: white;
    cursor: pointer;
    overflow: hidden;">详情</span>
            <span><a href="{{url('center/agent')}}">返回</a></span>
        </div>
        <div class="center">
            <table class="tab1">
            @if(!empty($data['agent']['data']))
                <tr>
                    <td>姓名： <span>{{$data['agent']['data']['agent_name']}}</span></td>
                    <td>性别： <span>男</span></td>
                    <td>上级代理名： <span>{{$data['agent']['data']['p_name']}}</span></td>
                </tr>
                <tr>
                    <td>电话： <span>{{$data['agent']['data']['mobile']}}</span></td>
                    <td>级别： <span>{{$data['agent']['data']['lev']}}级</span></td>
                    <td>下级成员数： <span>{{$data['agent']['data']['last_num']}}</span>人</td>
                </tr>
                    <tr>
                        <td>该代理商品销售数量:&nbsp;&nbsp;&nbsp;{{$num}}</td>
                            @if(isset($data['agent']['data']['status'])&&$data['agent']['data']['status']==1)
                            <form id="excelform" action="{{urlAdmin('Index','getExcel')}}" method="get">
                                <span>选择销售时间段:</span>
                                <input type="hidden" name="id" value="{{$data['agent']['data']['id']}}">
                                <input type="text" name="starttime" style="width: 75px;" id="time1"/>
                                <span>-</span>
                                <input type="text" name="endtime"  style="width: 75px;" id="time2"/>&nbsp;
                                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                <span>导出销售记录条数：</span>
                                <input type="text" name="num1" value="0" style="width: 75px;" id="num1">
                                <span>-</span>
                                <input type="text" name="num2" value="1000" style="width: 75px;" id="num2">
                                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                <input id='excel' type="button" style="width: 39px; height: 35px;background: url('/imgs/excel.svg') no-repeat">
                            </form>
                            @endif
                    </tr>

             @endif
        </div>

    </div>
    <!-- end 点击品牌管理详情-->
<script>

    $('#excel').click(function(){

            $('#excelform').submit();

    });

    //时间搜索
//    var oSousuo = document.getElementById('sousuo');
//    var oSearch = document.getElementById('search');
//
//    oSousuo.onclick = function(){
//        //加载效果
//        //layer.load(2, {shade: false});
//        oSearch.submit();
//
//    }

    window.onload = function(){
        laydate({
            elem: '#time1'
        });
        laydate({
            elem: '#time2'
        });
    }





</script>
@endsection
